package com.example.grape_effect.interpolator

import com.lammy.grapeeffect.interpolator.LYInterpolator

class UniformSpeedInterpolator : LYInterpolator {
    var v: Float = 0f
    var start = 0f

    constructor(v: Float, start: Float) {
        this.v = v
        this.start = start
    }

    constructor(duration: Int, start: Float, end: Float) {
        v = (end - start) / duration
    }

    override fun getValue(time: Long): Float {
        return time * v
    }
}